#version 330 core
layout(triangles) in;
layout(triangle_strip, max_vertices = 3) out;

in vec3 vFragPos[];
in vec3 vNormal[];
in vec2 vTexCoords[];

out vec3 FragPos;
out vec3 Normal;
out vec2 TexCoords;

void main()
{
    gl_Position = gl_in[0].gl_Position;
    FragPos = vFragPos[0];
    Normal = vNormal[0];
    TexCoords = vTexCoords[0];
    EmitVertex();

    gl_Position = gl_in[1].gl_Position;
    FragPos = vFragPos[1];
    Normal = vNormal[1];
    TexCoords = vTexCoords[1];
    EmitVertex();

    gl_Position = gl_in[2].gl_Position;
    FragPos = vFragPos[2];
    Normal = vNormal[2];
    TexCoords = vTexCoords[2];
    EmitVertex();
    
    EndPrimitive();
}